﻿using RuoVea.ExUtil.Exceptions;
using System;

namespace RuoVea.ExUtil;

/// <summary>
/// 描 述：参数错误处理
/// </summary>
public partial class msg
{
    /// <summary>
    /// 带异常代码、异常消息初始化函数
    /// </summary>
    public static void w(int code, string msg) => throw new ParamiterException(code, msg);

    /// <summary>
    /// 异常消息、异常实例初始化函数
    /// </summary>
    public static void w(int code, Exception innerException) => throw new ParamiterException(code, innerException);


    /// <summary>
    /// 带异常代码、异常消息、异常实例初始化函数
    /// </summary>
    public static void w(int code, string msg, Exception innerException) => throw new ParamiterException(code, msg, innerException);


    /// <summary>
    /// 异常消息初始化函数
    /// </summary>
    public static void w(string msg) => throw new ParamiterException(msg);


    /// <summary>
    /// 异常消息、异常实例初始化函数
    /// </summary>
    public static void w(string msg, Exception innerException) => throw new ParamiterException(msg, innerException);
}
